﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AxeFrog.Security;

namespace AxeFrog.Web
{
	public interface IAccountAccessHandler : IDisposable
	{
		bool VerifyLoginStatus(long userID, string signature, string salt, out User user, out long[] roles, out AccessLevel accessLevel);
		bool Login(string username, string password, string salt, out User user, out long[] roles, out string signature, out AccessLevel accessLevel);
		bool SendAccountEmail(long userID, string subject, string fromName, string fromEmail, string host, int? port, string mailServerUsername, string mailServerPassword, string template);
		bool SendAccountEmail(string userEmail, string subject, string fromName, string fromEmail, string host, int? port, string mailServerUsername, string mailServerPassword, string template);
		bool CheckForOtherUserByName(string name, long currentUserID);
		bool CheckForOtherUserByEmail(string email, long currentUserID);
		bool CheckForOtherUserByUsername(string username, long currentUserID);
		User RegisterNewUser(string name, string username, string password, string email, int timezoneOffset);
		bool UpdateUser(User user, string signature, string salt);
	}
}
